package com.neusoft.lohas.common.persistence;

import java.io.Serializable;

/**
 * 返回给客户端的状态信息封装位置,不要在service层使用
 * @author Administrator
 *
 */
public class StatusBean<T> implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private T result;
	private int status=200;
	private String message = "success";

	public StatusBean() {
		status = 200;
		message = "成功";
	}

	public StatusBean(T result, int status, String message) {
		this.result = result;
		this.status = status;
		this.message = message;
	}

	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public final String getMessage() {
		return message;
	}

	public final void setMessage(String message) {
		this.message = message;
	}
	
	public static final int SUCCESS = 200;
	public static final int ERROR = 400;

}
